<extend name="layout/main" />

<block name="HEADER">
	
</block>

<block name="CONTENT">
	<control:grid id="grid" padding="0" height="100%" />
</block>

<block name="FOOTER">
	<script type="text/javascript">
		var page = (function(ns){
     	
		    //页面初始化
		    ns.init=function(){
		       
		    }
		    
		    
		    //驳回
		    ns.reject = function(id,desc){
		    	function yesFn(index){
			        $(".J-changeStatus").validformIn(function(data){ 
			        	$.ajaxs('/admin/v1/user/withdrawReject',{
			        		id:id,
			        		desc:data.desc
			        	}).then(function(res){
			        		grid.load();
			        		$.toast(1,"已成功驳回！");
			        		layer.close(index);
			        	});
			        });
			    }
			    let html= template("grid-tpl-reason",{value: desc});
			    $.openModalDialog(html,"确认",null,yesFn,["400px","250px"]);
		    }
		    
		    //确认提现
		    ns.confirm = function(id){
		    	$.confirm("确认提现?", function(index){
		    		$.ajaxs('/admin/v1/user/withdrawConfirm',{
		        		id:id
		        	}).then(function(res){
		        		grid.load();
		        		$.toast(1,"已成功提现！");
		        		layer.close(index);
		        	});
		    	});
		    }
		    
		    return ns;
		}({}));
		
		
		$(function(){ page.init();  });

	</script>
</block>